/**
 * 
 */
package com.huarui.component.service;

import java.util.List;
import java.util.Map;

import org.ewaf.framework.model.PagingInfo;

import com.huarui.company.dao.ICompanyDao;

/**
 * 这是一个基础数据查询实例类：示例如何查询Company数据
 * 
 * @author peng.sunp
 * 
 */
public class CompanyTipsDataQuerier implements TipsDataQuerier {

	private ICompanyDao companyDao;

	@Override
	public void queryTipsData(PagingInfo<String, Map<String, Object>> pageInfo) {
		List<Map<String, Object>> items = companyDao.getCompanysByPYCodePrefix(
				pageInfo.getCondition(), pageInfo.getSummary());
		int total = companyDao.getCompanysCountByPYCodePrefix(pageInfo
				.getCondition());
		pageInfo.setTotal(total);
		pageInfo.setItems(items);
	}

	public void setCompanyDao(ICompanyDao companyDao) {
		this.companyDao = companyDao;
	}

}
